<?php
require_once('../../controller/auth.php');
//Start session
	session_start();
	
	//Include database connection details
	require_once('../../controller/inc/config.inc');
	
	
	
	//Connect to mysql server
	$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
	if(!$link) {
		die('Failed to connect to server: ' . mysql_error());
	}
	
	//Select database
	$db = mysql_select_db("ttc_teachers");
	if(!$db) {
		die("Unable to select database");
	}
$nm=$_POST['name'];;
$pro=$_POST['pro'];
$type=$_POST['type'];
$stat=$_POST['stat'];
$loc=$_POST['loc'];
mysql_query ('SET NAMES utf8');
mysql_query('SET CHARACTER_SET utf8');

$insert=mysql_query("INSERT INTO ttc_information VALUES(null,'$nm','$pro','$type','$stat','$loc','$pro'");
if($insert){
	echo "<span class='alert alert-success'>TTC Added Successfully!</span>";
	}
	
	else {
		echo "<span class='alert alert-error'>Unable to Add TTC!</span>";
		
		}
	



?>